home *** CD-ROM | disk | FTP | other *** search
- ;* SWINT.ASM
- ;************************************************************************
- ;* *
- ;* PC Scheme/Geneva 4.00 Borland TASM code *
- ;* *
- ;* (c) 1985-1988 by Texas Instruments, Inc. See COPYRIGHT.TXT *
- ;* (c) 1992 by L. Bartholdi & M. Vuilleumier, University of Geneva *
- ;* *
- ;*----------------------------------------------------------------------*
- ;* *
- ;* Dispatch a software interrupt *
- ;* *
- ;*----------------------------------------------------------------------*
- ;* *
- ;* Created by: John Jensen Date: 1985 *
- ;* Revision history: *
- ;* - 18 Jun 92: Renaissance (Borland Compilers, ...) *
- ;* *
- ;* ``In nomine omnipotentii dei'' *
- ;************************************************************************
- IDEAL
- %PAGESIZE 60, 132
- MODEL medium
- LOCALS @@
-
- INCLUDE "scheme.ash"
-
- CODESEG
-
- PROC C sw_int USES si di, @@intnum, @@ax, @@bx, @@cx, @@dx
- mov al, [byte @@intnum]
- mov [cs:@@intno], al ; Self-modify interrupt call in code
- mov ax, [@@ax]
- mov bx, [@@bx]
- mov cx, [@@cx]
- mov dx, [@@dx]
- jmp @@proceed ; required to flush instruction queue
- @@proceed:
- DB 0cdh ; Byte code for INT instruction
- @@intno DB 070h ; Byte code for interrupt number
- ret
- ENDP sw_int
-
- END
-